<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>阿毛的博客</title><meta name="author" content="myl"><meta name="copyright" content="myl"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta property="og:type" content="website">
<meta property="og:title" content="阿毛的博客">
<meta property="og:url" content="https://gitee.com/tgreen/myl-mm.git/page/2/index.html">
<meta property="og:site_name" content="阿毛的博客">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png">
<meta property="article:author" content="myl">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png"><link rel="shortcut icon" href="/myl-mm/img/favicon.png"><link rel="canonical" href="https://gitee.com/tgreen/myl-mm.git/page/2/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/myl-mm/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/myl-mm/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '阿毛的博客',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2022-05-09 19:46:23'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 5.4.2"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/myl-mm/archives/"><div class="headline">文章</div><div class="length-num">22</div></a><a href="/myl-mm/tags/"><div class="headline">标签</div><div class="length-num">11</div></a><a href="/myl-mm/categories/"><div class="headline">分类</div><div class="length-num">7</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/myl-mm/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/myl-mm/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></div><div class="menus_item"><a class="site-page" href="/myl-mm/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header"><nav id="nav"><span id="blog_name"><a id="site-name" href="/myl-mm/">阿毛的博客</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/myl-mm/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/myl-mm/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></div><div class="menus_item"><a class="site-page" href="/myl-mm/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">阿毛的博客</h1></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/myl-mm/2022/05/09/Dubbo/" title="Dubbo"><img class="post_bg" src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="Dubbo"></a></div><div class="recent-post-info"><a class="article-title" href="/myl-mm/2022/05/09/Dubbo/" title="Dubbo">Dubbo</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-05-09T09:00:14.518Z" title="发表于 2022-05-09 17:00:14">2022-05-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myl-mm/categories/Dubbo/">Dubbo</a></span></div><div class="content">1-今日内容 分布式系统中的相关概念
dubbo 概述
dubbo快速入门
dubbo的高级特性
2-相关概念2.1-互联网项目架构-特点互联网项目架构-特点

用户多

流量大，并发高

海量数据

易受攻击

功能繁琐

变更快


传统项目和互联网项目的不同

用户体验：    美观、功能、速度、稳定性
衡量一个网站速度是否快:    打开一个新页面一瞬间完成;页面内跳转，-刹那间完成。    根据佛经《僧衹律》记载:一 刹那者为-念,二十念为-瞬,二十瞬为-弹    指，二十弹指为-罗预， 二十罗预为-须臾，一日一夜有三十须臾。
2.2-互联网项目架构-目标衡量网站的性能指标:    **响应时间:**指执行一个请求从开始到最后收到响应数据所花费的总体时间。    **并发数:**指系统同时能处理的请求数量。    并发连接数: 指的是客户端向服务器发起请求，并建立了TCP连接。每秒钟服务器连接的总TCP数量    **请求数:**也称为QPS(Query Per Second)指每秒多少请求.    **并发用户数:**单位时间内有多少用户    **吞吐量:**指单位时间内 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/myl-mm/2022/05/09/Maven%E9%AB%98%E7%BA%A7/" title="Maven高级"><img class="post_bg" src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="Maven高级"></a></div><div class="recent-post-info"><a class="article-title" href="/myl-mm/2022/05/09/Maven%E9%AB%98%E7%BA%A7/" title="Maven高级">Maven高级</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-05-09T09:00:00.046Z" title="发表于 2022-05-09 17:00:00">2022-05-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myl-mm/categories/Maven/">Maven</a></span></div><div class="content">Maven高级1)分模块开发与设计1.1)工程模块与模块划分
1.2)ssm_pojo拆分新建模块
拷贝原始项目中对应的相关内容到ssm_pojo模块中
​	实体类（User）
​	配置文件（无）
1.3)ssm_dao拆分
新建模块

拷贝原始项目中对应的相关内容到ssm_dao模块中

数据层接口（UserDao）

配置文件：保留与数据层相关配置文件(3个）

注意：分页插件在配置中与SqlSessionFactoryBean绑定，需要保留

pom.xml：引入数据层相关坐标即可，删除springmvc相关坐标

spring

mybatis

spring 整合mybatis

mysql

druid

pagehelper

直接依赖ssm_pojo（对ssm_pojo模块执行install指令，将其安装到本地仓库）






1.4)ssm_service拆分
新建模块

拷贝原始项目中对应的相关内容到ssm_service模块中

业务层接口与实现类（UserService、UserServiceImpl）

配置文件：保留与数据层相关配置文件(1个）

pom. ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/myl-mm/2022/05/09/springMVCday03/" title="SpringMVC-day03"><img class="post_bg" src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="SpringMVC-day03"></a></div><div class="recent-post-info"><a class="article-title" href="/myl-mm/2022/05/09/springMVCday03/" title="SpringMVC-day03">SpringMVC-day03</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-05-09T08:59:31.450Z" title="发表于 2022-05-09 16:59:31">2022-05-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myl-mm/categories/spring/">spring</a></span></div><div class="content">1 校验框架1.1 校验框架入门1.1.1 表单校验的重要性
表单校验保障了数据有效性、安全性


数据可以随意输入，导致错误的结果。后端表单校验的重要性。
1.1.2 表单校验分类
校验位置：
客户端校验
服务端校验


校验内容与对应方式：
格式校验
客户端：使用Js技术，利用正则表达式校验
服务端：使用校验框架


逻辑校验
客户端：使用ajax发送要校验的数据，在服务端完成逻辑校验，返回校验结果
服务端：接收到完整的请求后，在执行业务操作前，完成逻辑校验





1.1.3 表单校验规则
长度：例如用户名长度，评论字符数量
非法字符：例如用户名组成
数据格式：例如Email格式、 IP地址格式
边界值：例如转账金额上限，年龄上下限
重复性：例如用户名是否重复

1.1.4 表单校验框架
JSR（Java Specification Requests）：Java 规范提案  
  303：提供bean属性相关校验规则  

JSR规范列表

企业应用技术 Contexts and Dependency Injection for Java (Web Beans 1.0) (J ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/myl-mm/2022/05/09/springMVCday02/" title="SpringMVC-day02"><img class="post_bg" src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="SpringMVC-day02"></a></div><div class="recent-post-info"><a class="article-title" href="/myl-mm/2022/05/09/springMVCday02/" title="SpringMVC-day02">SpringMVC-day02</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-05-09T08:59:05.903Z" title="发表于 2022-05-09 16:59:05">2022-05-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myl-mm/categories/spring/">spring</a></span></div><div class="content">1 异步调用1.1 发送异步请求（回顾）123456789101112131415&lt;a href=&quot;javascript:void(0);&quot; id=&quot;testAjax&quot;&gt;访问controller&lt;/a&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;/js/jquery-3.3.1.min.js&quot;&gt;&lt;/script&gt;&lt;script type=&quot;text/javascript&quot;&gt;    $(function()&#123;    $(&quot;#testAjax&quot;).click(function()&#123; //为id=&quot;testAjax&quot;的组件绑定点击事件        $.ajax(&#123; //发送异步调用            type:&quot;POST&quot;, //请求方式： POST请求            url:&quot;ajaxCont ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/myl-mm/2022/05/09/springMVCday01/" title="SpringMVC-day01"><img class="post_bg" src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="SpringMVC-day01"></a></div><div class="recent-post-info"><a class="article-title" href="/myl-mm/2022/05/09/springMVCday01/" title="SpringMVC-day01">SpringMVC-day01</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-05-09T08:58:07.647Z" title="发表于 2022-05-09 16:58:07">2022-05-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myl-mm/categories/spring/">spring</a></span></div><div class="content">1 SpringMVC 概述三层架构    

表现层：负责数据展示

业务层：负责业务处理

数据层：负责数据操作



MVC（Model View Controller），一种用于设计创建Web应用程序表现层的模式

Model（模型）：数据模型，用于封装数据

View（视图）：页面视图，用于展示数据



jsp  
html

Controller（控制器）：处理用户交互的调度器，用于根据用户需求处理程序逻辑

Servlet
SpringMVC

  

2 入门案例2.1 入门案例制作①导入SpringMVC相关坐标
1234567891011121314151617181920212223242526272829303132&lt;!-- servlet3.1规范的坐标 --&gt;&lt;dependency&gt;    &lt;groupId&gt;javax.servlet&lt;/groupId&gt;    &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;    &lt;version&gt;3. ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/myl-mm/2022/05/09/spring-day04/" title="Spring-day04"><img class="post_bg" src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="Spring-day04"></a></div><div class="recent-post-info"><a class="article-title" href="/myl-mm/2022/05/09/spring-day04/" title="Spring-day04">Spring-day04</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-05-09T08:57:34.058Z" title="发表于 2022-05-09 16:57:34">2022-05-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myl-mm/categories/spring/">spring</a></span></div><div class="content">spring 事务1)事务回顾1.1)什么是事务？事务指数据库中多个操作合并在一起形成的操作序列
1.2)事务的作用1.当数据库操作序列中个别操作失败时，提供一种方式使数据库状态恢复到正常状态（A），保障数据库即使在异常状态下仍能保持数据一致性（C）（要么操作前状态，要么操作后状态）。
2.当出现并发访问数据库时，在多个访问间进行相互隔离，防止并发访问操作结果互相干扰（I）。

事务特征（ACID）

原子性（Atomicity）指事务是一个不可分割的整体，其中的操作要么全执行或全不执行

一致性（Consistency）事务前后数据的完整性必须保持一致

隔离性（Isolation）事务的隔离性是多个用户并发访问数据库时，数据库为每一个用户开启的事务，不能被其他事务的操作数据所干扰，多个并发事务之间要相互隔离

持久性（Durability）持久性是指一个事务一旦被提交，它对数据库中数据的改变就是永久性的，接下来即使数据库发生故障也不应该对其有任何影响




1.3)事务的隔离级
脏读：允许读取未提交的信息

原因：Read uncommitted

解决方案： （表级读锁）


 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/myl-mm/2022/05/09/Spring-day03/" title="Spring-day03"><img class="post_bg" src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="Spring-day03"></a></div><div class="recent-post-info"><a class="article-title" href="/myl-mm/2022/05/09/Spring-day03/" title="Spring-day03">Spring-day03</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-05-09T08:57:26.736Z" title="发表于 2022-05-09 16:57:26">2022-05-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myl-mm/categories/spring/">spring</a></span></div><div class="content">AOP1)AOP简介1.1)OOP开发思路
1.2)AOP开发思想
1.3)AOP概念
AOP(Aspect Oriented Programing)面向切面编程，一种编程范式，隶属于软工范畴，指导开发者如何组织程序结构

AOP弥补了OOP的不足，基于OOP基础之上进行横向开发

uOOP规定程序开发以类为主体模型，一切围绕对象进行，完成某个任务先构建模型

uAOP程序开发主要关注基于OOP开发中的共性功能，一切围绕共性功能进行，完成某个任务先构建可能遇到的所有共性功能（当所有功能都开发出来也就没有共性与非共性之分）



“AOP联盟”


1.4)AOP作用
伴随着AOP时代的降临，可以从各个行业的标准化、规范化开始入手，一步一步将所有共性功能逐一开发完毕，最终以功能组合来完成个别业务模块乃至整体业务系统的开发

目标：将软件开发由手工制作走向半自动化&#x2F;全自动化阶段，实现“插拔式组件体系结构”搭建


1.5)AOP优势
提高代码的可重用性

业务代码编码更简洁

业务代码维护更高效

业务功能扩展更便捷



2)AOP入门案例2.1)AOP相关概念



Join ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/myl-mm/2022/05/09/Spring-day02/" title="Spring-day02"><img class="post_bg" src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="Spring-day02"></a></div><div class="recent-post-info"><a class="article-title" href="/myl-mm/2022/05/09/Spring-day02/" title="Spring-day02">Spring-day02</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-05-09T08:57:19.234Z" title="发表于 2022-05-09 16:57:19">2022-05-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myl-mm/categories/spring/">spring</a></span></div><div class="content">注解开发1)注解驱动的意义1.1)什么是注解驱动注解启动时使用注解的形式替代xml配置，将繁杂的spring配置文件从工程中彻底消除掉，简化书写

1.2)注解驱动的弊端
为了达成注解驱动的目的，可能会将原先很简单的书写，变的更加复杂

XML中配置第三方开发的资源是很方便的，但使用注解驱动无法在第三方开发的资源中进行编辑，因此会增大开发工作量



2)常用注解2.1)启动注解功能
启动注解扫描，加载类中配置的注解项
1&lt;context:component-scan base-package=&quot;packageName&quot;/&gt;

说明：

在进行包所扫描时，会对配置的包及其子包中所有文件进行扫描

扫描过程是以文件夹递归迭代的形式进行的

扫描过程仅读取合法的java文件

扫描时仅读取spring可识别的注解

扫描结束后会将可识别的有效注解转化为spring对应的资源加入IoC容器



注意：

无论是注解格式还是XML配置格式，最终都是将资源加载到IoC容器中，差别仅仅是数据读取方式不同

从加载效率上来说注解优于XML配置文件




2.2)b ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/myl-mm/2022/05/09/Spring-day01/" title="Spring-day01"><img class="post_bg" src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="Spring-day01"></a></div><div class="recent-post-info"><a class="article-title" href="/myl-mm/2022/05/09/Spring-day01/" title="Spring-day01">Spring-day01</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-05-09T08:57:09.786Z" title="发表于 2022-05-09 16:57:09">2022-05-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myl-mm/categories/spring/">spring</a></span></div><div class="content">Spring-day01   IoC1)Spring简介1.1)什么是框架
源自于建筑学，隶属土木工程，后发展到软件工程领域

软件工程框架：经过验证的，具有一定功能的，半成品软件

经过验证

具有一定功能

半成品





1.2)框架的作用
1.3)Spring是什么Spring是分层的JavaSE&#x2F;EE应用full-stack轻量级开源框架

1.4)Spring的体系结构
1.5)Spring的发展历史
1.6)Spring优势


Spring的优势




方便解耦，简化开发
第一天


方便集成各种优秀框架
第一天


方便程序的测试
第二天


AOP编程的支持
第三天


声明式事务的支持
第四天


降低JavaEE API的使用难度
第四天


Java源码是经典学习范例
长期学习


2)IoC简介2.1)优质程序代码的制作原则
2.2)耦合与内聚
耦合（Coupling）：代码书写过程中所使用技术的结合紧密度，用于衡量软件中各个模块之间的互联程度

内聚（Cohesion）：代码书写过程中单个模块内部各组成部分间的联系，用于衡量软件中各个功能模块 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/myl-mm/2022/05/09/dubbo-admin%E5%AE%89%E8%A3%85/" title="dubbo-admin安装"><img class="post_bg" src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="dubbo-admin安装"></a></div><div class="recent-post-info"><a class="article-title" href="/myl-mm/2022/05/09/dubbo-admin%E5%AE%89%E8%A3%85/" title="dubbo-admin安装">dubbo-admin安装</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-05-09T08:54:56.848Z" title="发表于 2022-05-09 16:54:56">2022-05-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/myl-mm/categories/Dubbo/">Dubbo</a></span></div><div class="content">一、dubbo-admin安装1、环境准备
dubbo-admin 是一个前后端分离的项目。前端使用vue，后端使用springboot，安装 dubbo-admin 其实就是部署该项目。我们将dubbo-admin安装到开发环境上。要保证开发环境有jdk，maven，nodejs
安装node**(如果当前机器已经安装请忽略)**
因为前端工程是用vue开发的，所以需要安装node.js，node.js中自带了npm，后面我们会通过npm启动
下载地址
1https://nodejs.org/en/


2、下载 Dubbo-Admin
进入github，搜索dubbo-admin
1https://github.com/apache/dubbo-admin

下载：

3、把下载的zip包解压到指定文件夹(解压到那个文件夹随意)

4、修改配置文件
解压后我们进入…\dubbo-admin-develop\dubbo-admin-server\src\main\resources目录，找到 application.properties 配置文件 进行配置修改

修改zookeepe ...</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/myl-mm/"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/myl-mm/">1</a><span class="page-number current">2</span><a class="page-number" href="/myl-mm/page/3/#content-inner">3</a><a class="extend next" rel="next" href="/myl-mm/page/3/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="this.onerror=null;this.src='/myl-mm/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">myl</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/myl-mm/archives/"><div class="headline">文章</div><div class="length-num">22</div></a><a href="/myl-mm/tags/"><div class="headline">标签</div><div class="length-num">11</div></a><a href="/myl-mm/categories/"><div class="headline">分类</div><div class="length-num">7</div></a></div><a id="card-info-btn" href="https://gitee.com/tgreen/"><i class="fab fa-github"></i><span>Follow Me</span></a></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">欢迎观看，又来一个！</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/myl-mm/2022/05/09/RabbitMQ%20Windows%20%E5%AE%89%E8%A3%85/" title="RabbitMQ Windows 安装"><img src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="RabbitMQ Windows 安装"/></a><div class="content"><a class="title" href="/myl-mm/2022/05/09/RabbitMQ%20Windows%20%E5%AE%89%E8%A3%85/" title="RabbitMQ Windows 安装">RabbitMQ Windows 安装</a><time datetime="2022-05-09T09:04:30.600Z" title="发表于 2022-05-09 17:04:30">2022-05-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/myl-mm/2022/05/09/gateway%E5%86%85%E7%BD%AE%E8%BF%87%E6%BB%A4%E5%99%A8%E5%B7%A5%E5%8E%82/" title="Spring Cloud Gateway 内置的过滤器工厂"><img src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="Spring Cloud Gateway 内置的过滤器工厂"/></a><div class="content"><a class="title" href="/myl-mm/2022/05/09/gateway%E5%86%85%E7%BD%AE%E8%BF%87%E6%BB%A4%E5%99%A8%E5%B7%A5%E5%8E%82/" title="Spring Cloud Gateway 内置的过滤器工厂">Spring Cloud Gateway 内置的过滤器工厂</a><time datetime="2022-05-09T09:04:19.065Z" title="发表于 2022-05-09 17:04:19">2022-05-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/myl-mm/2022/05/09/Turbine%E6%90%AD%E5%BB%BA%E6%AD%A5%E9%AA%A4/" title="Turbine"><img src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="Turbine"/></a><div class="content"><a class="title" href="/myl-mm/2022/05/09/Turbine%E6%90%AD%E5%BB%BA%E6%AD%A5%E9%AA%A4/" title="Turbine">Turbine</a><time datetime="2022-05-09T09:04:13.000Z" title="发表于 2022-05-09 17:04:13">2022-05-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/myl-mm/2022/05/09/Eureka%20%E5%85%A8%E9%83%A8%E9%85%8D%E7%BD%AE%20/" title="Euraka配置详解"><img src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="Euraka配置详解"/></a><div class="content"><a class="title" href="/myl-mm/2022/05/09/Eureka%20%E5%85%A8%E9%83%A8%E9%85%8D%E7%BD%AE%20/" title="Euraka配置详解">Euraka配置详解</a><time datetime="2022-05-09T09:03:49.699Z" title="发表于 2022-05-09 17:03:49">2022-05-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/myl-mm/2022/05/09/01-Springboot-day01/" title="springBootday01"><img src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="springBootday01"/></a><div class="content"><a class="title" href="/myl-mm/2022/05/09/01-Springboot-day01/" title="springBootday01">springBootday01</a><time datetime="2022-05-09T09:03:15.476Z" title="发表于 2022-05-09 17:03:15">2022-05-09</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/myl-mm/categories/Dubbo/"><span class="card-category-list-name">Dubbo</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myl-mm/categories/Maven/"><span class="card-category-list-name">Maven</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myl-mm/categories/RabbitMq/"><span class="card-category-list-name">RabbitMq</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myl-mm/categories/Redis/"><span class="card-category-list-name">Redis</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myl-mm/categories/ZooKeeper/"><span class="card-category-list-name">ZooKeeper</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myl-mm/categories/spring/"><span class="card-category-list-name">spring</span><span class="card-category-list-count">9</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/myl-mm/categories/springcloud/"><span class="card-category-list-name">springcloud</span><span class="card-category-list-count">3</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/myl-mm/tags/Dubbo/" style="font-size: 1.23em; color: #999ea6">Dubbo</a> <a href="/myl-mm/tags/Maven/" style="font-size: 1.1em; color: #999">Maven</a> <a href="/myl-mm/tags/RabbitMq/" style="font-size: 1.37em; color: #99a4b2">RabbitMq</a> <a href="/myl-mm/tags/Redis/" style="font-size: 1.1em; color: #999">Redis</a> <a href="/myl-mm/tags/Turbine/" style="font-size: 1.1em; color: #999">Turbine</a> <a href="/myl-mm/tags/ZooKeeper/" style="font-size: 1.23em; color: #999ea6">ZooKeeper</a> <a href="/myl-mm/tags/eureka/" style="font-size: 1.1em; color: #999">eureka</a> <a href="/myl-mm/tags/gateway/" style="font-size: 1.1em; color: #999">gateway</a> <a href="/myl-mm/tags/spring/" style="font-size: 1.5em; color: #99a9bf">spring</a> <a href="/myl-mm/tags/springBoot/" style="font-size: 1.23em; color: #999ea6">springBoot</a> <a href="/myl-mm/tags/springMVC/" style="font-size: 1.37em; color: #99a4b2">springMVC</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/myl-mm/archives/2022/05/"><span class="card-archive-list-date">五月 2022</span><span class="card-archive-list-count">22</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">22</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2022-05-09T11:46:23.554Z"></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2022 By myl</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/myl-mm/js/utils.js"></script><script src="/myl-mm/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js"></script><div class="js-pjax"></div><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>